//
//  MisListasViewController.h
//  misDeseos
//
//  Created by Roger Plana Casadella on 11/11/11.
//  Copyright (c) 2011 Champions Freak. All rights reserved.
//

#import <UIKit/UIKit.h>

#define MIS_LISTAS_CUENTAS 0
#define MIS_LISTAS_CREAR_LISTA 1
#define MIS_LISTAS_LISTAS 2
#define MIS_LISTAS_ITEMS_LISTA 3
#define MIS_LISTAS_CATEGORIAS 4
#define MIS_LISTAS_SUBCATEGORIAS 5
#define MIS_LISTAS_ADD_ITEM 6

#define MIS_LISTAS_LIST_TITLE 0
#define MIS_LISTAT_LIST_END_DATE 1
#define MIS_LISTAT_LIST_CAT 2
#define MIS_LISTAT_LIST_ID 3

@class MainViewController;

@interface MisListasViewController : UIViewController <UITableViewDataSource, UITableViewDelegate, UITextFieldDelegate, UIPickerViewDataSource, UIPickerViewDelegate> 
{
    MainViewController *mvc;
    NSMutableArray *_infoListas;
    NSMutableArray *_categories;
    NSMutableArray *_cuentas;
    NSMutableArray *_listItems;
    NSMutableArray *_subCategory;
    NSIndexPath *_selectedList;
    int action;
    int requestAction;
    int selectedAccount;
    int selectedCategory;
    int selectedSubcategory;
}

@property (nonatomic, retain) IBOutlet UITableView *taula;
@property (nonatomic, retain) IBOutlet UIView *dpView;
@property (nonatomic, retain) IBOutlet UIDatePicker *dp;
@property (nonatomic, retain) IBOutlet UIView *mainView;
@property (nonatomic, retain) IBOutlet UIView *createView;
@property (nonatomic, retain) IBOutlet UITextField *titleTF;
@property (nonatomic, retain) IBOutlet UITextField *endDateTF;
@property (nonatomic, retain) IBOutlet UITextField *categoryTF;
@property (nonatomic, retain) IBOutlet UITextField *cuentaTF;
@property (nonatomic, retain) IBOutlet UIPickerView *cp;
@property (nonatomic, retain) IBOutlet UIView *cpView;
@property (nonatomic, retain) IBOutlet UILabel *titlePuntsL;
@property (nonatomic, retain) IBOutlet UILabel *puntsActualsL;
@property (nonatomic, retain) IBOutlet UILabel *costPuntsL;
@property (nonatomic, retain) IBOutlet UILabel *dinersTotalsL;
@property (nonatomic, retain) IBOutlet UILabel *titleRegalos;
@property (nonatomic, retain) IBOutlet UITableView *taulaSub;
@property (nonatomic, retain) IBOutlet UIView *regalosView;
@property (nonatomic, retain) IBOutlet UIView *anyadirRegalosView;
@property (nonatomic, retain) IBOutlet UITextField *anyadirTituloTF;
@property (nonatomic, retain) IBOutlet UITextField *anyadirDondeTF;
@property (nonatomic, retain) IBOutlet UITextField *anyadirCatTF;
@property (nonatomic, retain) IBOutlet UIPickerView *scp;
@property (nonatomic, retain) IBOutlet UIView *scpView;

@property (nonatomic, retain) NSMutableArray *infoListas;
@property (nonatomic, retain) NSMutableArray *categories;
@property (nonatomic, retain) NSMutableArray *cuentas;
@property (nonatomic, retain) NSMutableArray *listItems;
@property (nonatomic, retain) NSMutableArray *subCategory;
@property (nonatomic, retain) NSIndexPath *selectedList;

- (IBAction)HomeAction:(id)sender;
- (IBAction)NewListAction:(id)sender;
- (IBAction)CancelAction:(id)sender;
- (IBAction)CreateAction:(id)sender;
- (IBAction)backgroundTap:(id)sender;
- (IBAction)DonePickingDate:(id)sender;
- (IBAction)DonePickingCategory:(id)sender;
- (IBAction)EditarRegalosAction:(id)sender;
- (IBAction)AddRegaloAction:(id)sender;
- (IBAction)FinalizarListaAction:(id)sender;
- (IBAction)BackToListaAction:(id)sender;
- (IBAction)BackToListaRegalosAction:(id)sender;
- (IBAction)InsertarRegaloAction:(id)sender;


-(void)listsRequest;
-(void)accountsRequest;
-(void)categoriesRequest;
-(void)createListRequest;
-(void)regalsRequest;

@end
